<template>
	<view class="box">
		<view class="img-box z-0">
			<image :src="info.image" mode="widthFix"></image>
		</view>
		<view class="padding-30 z-1" style="width: 100%;">
			<view class="bg-white padding-20 title-box">
				<view class="fs-30 fw-b color-0 ">
					{{info.title}}
				</view>
				<view class="fs-24 fw-b color-6 margin-t-20">
					<text class="color-red fs-24">￥</text>
					<text class="color-red fs-34 fw-b" style="margin-right: 10rpx;">{{info.price}}</text>
					起
				</view>
			</view>
		</view>
		<view class="padding-l-r-30">
			<view class="bg-white content-box">
				<view class="title fs-30 color-0 padding-l-r-20">
					服务内容
				</view>
				<view class="img-box" >
                    <u-parse :content="info.content"></u-parse>
					<!--<image :src="item" mode="widthFix"></image>-->
				</view>
			</view>
		</view>
		<view class="btn-box padding-l-r-30 bg-white">
			<view class="btn" @click="confirm">服务下单</view>
		</view>
	</view>
</template>

<script>
import {serviceDetail} from "@/api/homeCare";

export default {
		data() {
			return {
				info: { },
                id:''
			}
		},
		onLoad(e) {
            this.id = e.id
            this.getDetail()
		},
		methods: {
			confirm(){
				uni.navigateTo({
					url:"/pageA/service/confirm?service_id="+this.id + '&type='+2
				})
			},
            getDetail(){
                serviceDetail({
                    service_id:this.id
                }).then(res=>{
                    this.info = res.data
                })
            }
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		padding-bottom: 160rpx;;
		background: #F7F7F7;
	}

	.img-box {
		image {
			width: 100%;
		}
	}
	.title-box {
		margin-top: -90rpx;
		height: 180rpx;
		border-radius: 14rpx;
	}
	.title {
		line-height: 90rpx;
	}
	.btn-box {
		position: fixed;
		left: 0;
		bottom: 0;
		padding-top: 10rpx;
		height: 160rpx;
		.btn {
			width: 690rpx;
			height: 90rpx;
			background: #43ABC4;
			border-radius: 14rpx;
			color: #fff;
			text-align: center;
			line-height: 90rpx;
			z-index: 3;
		}
	}
</style>